home *** CD-ROM | disk | FTP | other *** search
-
-
-
- iiiiffffllllLLLLiiiisssstttt((((3333)))) IIIImmmmaaaaggggeeee FFFFoooorrrrmmmmaaaatttt LLLLiiiibbbbrrrraaaarrrryyyy CCCC++++++++ RRRReeeeffffeeeerrrreeeennnncccceeee MMMMaaaannnnuuuuaaaallll iiiiffffllllLLLLiiiisssstttt((((3333))))
-
-
-
- NNNNAAAAMMMMEEEE
- iiiiffffllllLLLLiiiisssstttt,,,, iiiiffffllllMMMMuuuullllttttiiiiLLLLiiiisssstttt - simple doubly-linked list
-
- IIIINNNNHHHHEEEERRRRIIIITTTTSSSS FFFFRRRROOOOMMMM
- This is a base class.
-
- HHHHEEEEAAAADDDDEEEERRRR FFFFIIIILLLLEEEE
- #include <ifl/iflList.h>
-
- CCCCLLLLAAAASSSSSSSS DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
- iflList provides a lightweight, fast, doubly-linked list template.
-
- UUUUssssiiiinnnngggg iiiiffffllllLLLLiiiisssstttt
- Derive from iflListItem to place objects of type itemType in an doubly-
- linked list (iflList<itemType>); for example to define a list element
- that can hold an x,y int pair you would write:
-
- class XY : public iflListItem {
- public:
- XY(int X, int Y) { x = X; y = Y; }
- int x, y;
- };
-
-
- You could then use it with code like:
-
- XY foo(3,4);
- iflList<XY> list;
- list.append(&foo);
- ...
- iflListIter<XY> iter(list);
- XY* item;
- while (item = iter.next()) item->unlink();
-
-
- If you need to place an object in two lists simulaneously you would write
- something like:
-
- class XY;
- class A : public iflListItem {};
- class B : public iflListItem {};
-
- class XY : public A, public B {
- public:
- XY(int X, int Y) { x = X; y = Y; }
- int x, y;
- };
-
-
- and to operate on the "A" list of the XY elements:
-
-
-
-
-
- PPPPaaaaggggeeee 1111
-
-
-
-
-
-
- iiiiffffllllLLLLiiiisssstttt((((3333)))) IIIImmmmaaaaggggeeee FFFFoooorrrrmmmmaaaatttt LLLLiiiibbbbrrrraaaarrrryyyy CCCC++++++++ RRRReeeeffffeeeerrrreeeennnncccceeee MMMMaaaannnnuuuuaaaallll iiiiffffllllLLLLiiiisssstttt((((3333))))
-
-
-
- XY foo(3,4);
- iflMutliList<XY,A> list;
- list.append(&foo);
- ...
- iflMultiListIter<XY,A> iter(list);
- XY* xy;
- while (item = iter.next()) item->unlink();
-
-
- CCCCLLLLAAAASSSSSSSS MMMMEEEEMMMMBBBBEEEERRRR FFFFUUUUNNNNCCCCTTTTIIIIOOOONNNN SSSSUUUUMMMMMMMMAAAARRRRYYYY
- CCCCoooonnnnssssttttrrrruuuuccccttttoooorrrrssss
- iflList<type>()
- iflMultiList<itemType,linkageType>()
-
-
- EEEEddddiiiittttiiiinnnngggg
- void append(linkageType* item)
- void appendList(iflMultiList<itemType,linkageType>* list)
- void appendSubList(linkageType* bgn, linkageType* end)
- void clear()
- void insert(linkageType* item)
- void insertAfter(linkageType* item, linkageType* after)
- void insertBefore(linkageType* item, linkageType* before)
- void insertList(iflMultiList<itemType,linkageType>* list)
- void insertSubList(linkageType* bgn, linkageType* end)
- void unlink(linkageType* item)
-
-
- QQQQuuuueeeerrrryyyy
- int isEmpty() const
- itemType* head() const
- itemType* tail() const
- itemType* getNext(const linkageType* item) const
- itemType* getPrev(const linkageType* item) const
-
-
- FFFFUUUUNNNNCCCCTTTTIIIIOOOONNNN DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNNSSSS
- iiiiffffllllLLLLiiiisssstttt(((())))
-
- iflList<itemType>()
-
-
- Creates an iflMultiList of length zero (that is, empty list). The
- items will be of type _i_t_e_m_T_y_p_e. Access to the next and prev pointers
- will also be through itemType. Use this form of the constructor
- with items that will be placed on only one type of list.
-
- iiiiffffllllMMMMuuuullllttttiiiiLLLLiiiisssstttt(((())))
-
- iflMultiList<itemType,linkageType>()
-
-
-
-
-
- PPPPaaaaggggeeee 2222
-
-
-
-
-
-
- iiiiffffllllLLLLiiiisssstttt((((3333)))) IIIImmmmaaaaggggeeee FFFFoooorrrrmmmmaaaatttt LLLLiiiibbbbrrrraaaarrrryyyy CCCC++++++++ RRRReeeeffffeeeerrrreeeennnncccceeee MMMMaaaannnnuuuuaaaallll iiiiffffllllLLLLiiiisssstttt((((3333))))
-
-
-
- Creates an iflMultiList of length zero (that is, empty list). The
- items will be of type _i_t_e_m_T_y_p_e. Access to the next and prev pointers
- will be done through casts to type _l_i_n_k_a_g_e_T_y_p_e. This form of the
- contructor is useful when used with items that will be placed on
- more than one type of list.
-
- aaaappppppppeeeennnndddd(((())))
-
- void append(linkageType* item)
-
-
- Appends _i_t_e_m to the end of the list.
-
- aaaappppppppeeeennnnddddLLLLiiiisssstttt(((())))
-
- void appendList(iflMultiList<itemType,linkageType>* list)
-
-
- Removes all of the items from _l_i_s_t and appends them to the end of
- this list (in the same order that they were on the original list).
-
- aaaappppppppeeeennnnddddSSSSuuuubbbbLLLLiiiisssstttt(((())))
-
- void appendSubList(linkageType* bgn, linkageType* end)
-
-
- Removes all of the items between _b_g_n and _e_n_d, inclusive, from
- whatever list they are on and appends them to the end of this list
- (in the same order that they were on the original list).
-
- cccclllleeeeaaaarrrr(((())))
-
- void clear()
-
-
- Clears the list of all items. This is not usually a good idea, but
- is sometimes necessary to avoid an assertion failure on destruction.
-
- ggggeeeettttNNNNeeeexxxxtttt(((())))
-
- itemType* getNext(const linkageType* item) const
-
-
- Returns the item immediately following _i_t_e_m or NULL if _i_t_e_m is at
- the end of the list.
-
-
-
-
-
-
-
-
-
-
- PPPPaaaaggggeeee 3333
-
-
-
-
-
-
- iiiiffffllllLLLLiiiisssstttt((((3333)))) IIIImmmmaaaaggggeeee FFFFoooorrrrmmmmaaaatttt LLLLiiiibbbbrrrraaaarrrryyyy CCCC++++++++ RRRReeeeffffeeeerrrreeeennnncccceeee MMMMaaaannnnuuuuaaaallll iiiiffffllllLLLLiiiisssstttt((((3333))))
-
-
-
- ggggeeeettttPPPPrrrreeeevvvv(((())))
-
- itemType* getPrev(const linkageType* item) const
-
-
- Returns the item immediately preceding _i_t_e_m or NULL if _i_t_e_m is at
- the beginning of the list.
-
- hhhheeeeaaaadddd(((())))
-
- itemType* head() const
-
-
- Returns the item at the head of the list or NULL if the list is
- empty.
-
- iiiinnnnsssseeeerrrrtttt(((())))
-
- void insert(linkageType* item)
-
-
- Inserts _i_t_e_m at the front of the list.
-
- iiiinnnnsssseeeerrrrttttAAAAfffftttteeeerrrr(((())))
-
- void insertAfter(linkageType* item, linkageType* after)
-
-
- Inserts _i_t_e_m immediately following the item indicated by _a_f_t_e_r.
-
- iiiinnnnsssseeeerrrrttttBBBBeeeeffffoooorrrreeee(((())))
-
- void insertBefore(linkageType* item, linkageType* before)
-
-
- Inserts _i_t_e_m immediately preceding the item indicated by _b_e_f_o_r_e.
-
- iiiinnnnsssseeeerrrrttttLLLLiiiisssstttt(((())))
-
- void insertList(iflMultiList<itemType,linkageType>* list)
-
-
- Removes all of the items from _l_i_s_t and prepends them to the front of
- this list (in the same order that they were on the original list).
-
- iiiinnnnsssseeeerrrrttttSSSSuuuubbbbLLLLiiiisssstttt(((())))
-
- void insertSubList(linkageType* bgn, linkageType* end)
-
-
-
-
-
-
-
- PPPPaaaaggggeeee 4444
-
-
-
-
-
-
- iiiiffffllllLLLLiiiisssstttt((((3333)))) IIIImmmmaaaaggggeeee FFFFoooorrrrmmmmaaaatttt LLLLiiiibbbbrrrraaaarrrryyyy CCCC++++++++ RRRReeeeffffeeeerrrreeeennnncccceeee MMMMaaaannnnuuuuaaaallll iiiiffffllllLLLLiiiisssstttt((((3333))))
-
-
-
- Removes all of the items between _b_g_n and _e_n_d, inclusive, from
- whatever list they are on and prepends them to the front of this
- list (in the same order that they were on the original list).
-
- iiiissssEEEEmmmmppppttttyyyy(((())))
-
- int isEmpty() const
-
-
- Returns TRUE if the list is empty, FALSE otherwise.
-
- ttttaaaaiiiillll(((())))
-
- itemType* tail() const
-
-
- Returns the item at the tail of the list or NULL if the list is
- empty.
-
- uuuunnnnlllliiiinnnnkkkk(((())))
-
- void unlink(linkageType* item)
-
-
- Unlinks the _i_t_e_m from the list. If _i_t_e_m is not on the list, the
- result is undefined.
-
- SSSSEEEEEEEE AAAALLLLSSSSOOOO
- iflListItem, iflListIter, iflListIterRev
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- PPPPaaaaggggeeee 5555
-
-
-
-